package com.qjc.demo.train.greedy;

/**
 * @ClassName: Goods
 * @Description: 物品
 * @Author: qjc
 * @Date: 2022/5/3 12:11 AM
 */
public class Goods {
    String name; // 物品名称
    double weight; // 物品重量
    double price; // 物品总价
    double unitPrice;// 物品单价

    public Goods(String name, double weight, double price) {
        this.name = name;
        this.weight = weight;
        this.price = price;
        this.unitPrice = price / weight;
    }

}
